<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage" %>

<%@ Import Namespace="CoolCode.Web.MVC" %>
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
    AjaxUpload
</asp:Content>
<asp:content id="Content2" contentplaceholderid="MainContent" runat="server">
    <%--<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.1/jquery.min.js" type="text/javascript"></script>
--%>

    <script src="../../Scripts/jquery-1.3.2.js" type="text/javascript"></script>

    <script src="../../Scripts/ajaxupload.js" type="text/javascript"></script>

    <h2>
        AjaxUpload</h2>
    <div id="uploadid1">
        Upload File</div>
    <script type="text/javascript">
         $(document).ready(function() {
            new AjaxUpload('#uploadid1', { action: '/JQuerySample/AjaxUploadFile/',
                onSubmit: function(file, ext) {
                    $('#uploadid1').text('Uploading ' + file);
                },
                onComplete: function(file) {
                    $('#uploadid1').text('Uploaded ' + file);
                }
            });
         });
    </script>

        <br />
        <br />
     <%=Ajax.Upload("Upload File2","AjaxUploadFile") %>  
    <%=ViewData["result"] %>
</asp:content>
